<template>
  <el-container>
    <el-aside width="200px">
      <el-card>
        <el-button @click="onAddComponent('RForm')">RForm</el-button>
      </el-card>

      <el-card>
        <el-button @click="onAddComponent('RSearchForm')">RSearchForm</el-button>
      </el-card>

      <el-card>
        <el-button @click="onAddComponent('RTable')">RTable</el-button>
      </el-card>

      <el-card>
        <el-button @click="onAddComponent('ELCard')">ELCard</el-button>
      </el-card>

      <el-card>
        <el-button @click="onAddComponent('ELDialog')">ELDialog</el-button>
      </el-card>
    </el-aside>
    <el-main>
      <el-cascader-panel v-model="parentRefs" :options="cascaderOptions" :props="{ checkStrictly: true }"></el-cascader-panel>
      <r-code-viewer :componentConfig="componentConfig" @jsonChange="onJsonChange" @codeChange="onCodeChange"> </r-code-viewer>
    </el-main>
  </el-container>
</template>

<script>
import { genComponentJson, parseComponentByJson, parseComponentByStr } from '../util/templateUtil.js'
import * as config from '../components/config'
// todo
export default {}
</script>
